﻿using FCT551.Helper;
using FCT551.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace FCT551.Views
{
    /// <summary>
    /// IODebugView.xaml 的交互逻辑
    /// </summary>
    public partial class IODebugView : UserControl
    {
        public IODebugView()
        {
            InitializeComponent();
            this.DataContext = new IODebugViewModel(this);
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
        }

        private void CloseAllIO(object sender, RoutedEventArgs e)
        {
            Global._PqwIoCommon.OffAll();
        }

        private async void airdown(object sender, RoutedEventArgs e)
        {
            await IoMotion.TopAirDown(5000);
        }

        private async void airup(object sender, RoutedEventArgs e)
        {
            await IoMotion.TopAirUp(5000);
        }
    }
}